/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.incomerecord.entity;

import com.jeeplus.modules.member.entity.Member;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;

/**
 * 购物收益记录Entity
 * @author lxj
 * @version 2020-11-06
 */
public class IncomeRecord extends DataEntity<IncomeRecord> {
	
	private static final long serialVersionUID = 1L;
	private String orderId;		// 订单编号
	private Member member;		// 用户名
	private Double money;		// 收益金额
	private Member frommember;		// 收益来源
	private String name;		// 收益名称
	private Date incomTime;		// 到账时间
	
	public IncomeRecord() {
		super();
	}

	public IncomeRecord(String id){
		super(id);
	}

	@ExcelField(title="订单编号", align=2, sort=1)
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
	@ExcelField(title="用户名", fieldType=Member.class, value="member.loginName", align=2, sort=2)
	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}
	
	@ExcelField(title="收益金额", align=2, sort=3)
	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}
	
	@ExcelField(title="收益来源", fieldType=Member.class, value="frommember.loginName", align=2, sort=4)
	public Member getFrommember() {
		return frommember;
	}

	public void setFrommember(Member frommember) {
		this.frommember = frommember;
	}
	
	@ExcelField(title="收益名称", align=2, sort=5)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="到账时间", align=2, sort=6)
	public Date getIncomTime() {
		return incomTime;
	}

	public void setIncomTime(Date incomTime) {
		this.incomTime = incomTime;
	}

	@Override
	public String toString() {
		return "IncomeRecord{" +
				"orderId='" + orderId + '\'' +
				", member=" + member +
				", money=" + money +
				", frommember=" + frommember +
				", name='" + name + '\'' +
				", incomTime=" + incomTime +
				'}';
	}
}